{
 "cells": [
  {
   "attachments": {},
   "cell_type": "markdown",
   "id": "eb440591",
   "metadata": {},
   "source": [
    "<a href=\"https://colab.research.google.com/github/run-llama/llama_index/blob/main/docs/examples/composable_indices/city_analysis/City_Analysis.ipynb\" target=\"_parent\"><img src=\"https://colab.research.google.com/assets/colab-badge.svg\" alt=\"Open In Colab\"/></a>"
   ]
  },
  {
   "attachments": {},
   "cell_type": "markdown",
   "id": "cfb64210-9c6b-47d7-81f4-67dbdab68e4c",
   "metadata": {},
   "source": [
    "# Test Complex Queries over Multiple Documents (text-davinci-003 vs. ChatGPT)\n",
    "\n",
    "Test complex queries over both text-davinci-003 and ChatGPT"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "D2ZI8iKch-V_",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Looking in indexes: https://pypi.org/simple, https://us-python.pkg.dev/colab-wheels/public/simple/\n",
      "Collecting llama-index\n",
      "  Downloading llama_index-0.4.17.tar.gz (122 kB)\n",
      "\u001b[2K     \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m122.8/122.8 KB\u001b[0m \u001b[31m9.7 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
      "\u001b[?25h  Preparing metadata (setup.py) ... \u001b[?25l\u001b[?25hdone\n",
      "Collecting langchain\n",
      "  Downloading langchain-0.0.98-py3-none-any.whl (337 kB)\n",
      "\u001b[2K     \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m337.8/337.8 KB\u001b[0m \u001b[31m23.9 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
      "\u001b[?25hCollecting openai>=0.26.4\n",
      "  Downloading openai-0.27.0-py3-none-any.whl (70 kB)\n",
      "\u001b[2K     \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m70.1/70.1 KB\u001b[0m \u001b[31m4.1 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
      "\u001b[?25hCollecting dataclasses_json\n",
      "  Downloading dataclasses_json-0.5.7-py3-none-any.whl (25 kB)\n",
      "Collecting transformers\n",
      "  Downloading transformers-4.26.1-py3-none-any.whl (6.3 MB)\n",
      "\u001b[2K     \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m6.3/6.3 MB\u001b[0m \u001b[31m73.5 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
      "\u001b[?25hRequirement already satisfied: nltk in /usr/local/lib/python3.8/dist-packages (from llama-index) (3.7)\n",
      "Requirement already satisfied: numpy in /usr/local/lib/python3.8/dist-packages (from llama-index) (1.22.4)\n",
      "Collecting tenacity<8.2.0\n",
      "  Downloading tenacity-8.1.0-py3-none-any.whl (23 kB)\n",
      "Requirement already satisfied: pandas in /usr/local/lib/python3.8/dist-packages (from llama-index) (1.3.5)\n",
      "Requirement already satisfied: tqdm in /usr/local/lib/python3.8/dist-packages (from openai>=0.26.4->llama-index) (4.64.1)\n",
      "Requirement already satisfied: requests>=2.20 in /usr/local/lib/python3.8/dist-packages (from openai>=0.26.4->llama-index) (2.25.1)\n",
      "Requirement already satisfied: aiohttp in /usr/local/lib/python3.8/dist-packages (from openai>=0.26.4->llama-index) (3.8.4)\n",
      "Requirement already satisfied: marshmallow<4.0.0,>=3.3.0 in /usr/local/lib/python3.8/dist-packages (from dataclasses_json->llama-index) (3.19.0)\n",
      "Collecting marshmallow-enum<2.0.0,>=1.5.1\n",
      "  Downloading marshmallow_enum-1.5.1-py2.py3-none-any.whl (4.2 kB)\n",
      "Collecting typing-inspect>=0.4.0\n",
      "  Downloading typing_inspect-0.8.0-py3-none-any.whl (8.7 kB)\n",
      "Collecting deeplake<4.0.0,>=3.2.9\n",
      "  Downloading deeplake-3.2.12.tar.gz (439 kB)\n",
      "\u001b[2K     \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m439.1/439.1 KB\u001b[0m \u001b[31m31.3 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
      "\u001b[?25h  Preparing metadata (setup.py) ... \u001b[?25l\u001b[?25hdone\n",
      "Requirement already satisfied: PyYAML<7,>=6 in /usr/local/lib/python3.8/dist-packages (from langchain->llama-index) (6.0)\n",
      "Requirement already satisfied: SQLAlchemy<2,>=1 in /usr/local/lib/python3.8/dist-packages (from langchain->llama-index) (1.4.46)\n",
      "Requirement already satisfied: pydantic<2,>=1 in /usr/local/lib/python3.8/dist-packages (from langchain->llama-index) (1.10.5)\n",
      "Collecting aleph-alpha-client<3.0.0,>=2.15.0\n",
      "  Downloading aleph_alpha_client-2.16.0-py3-none-any.whl (38 kB)\n",
      "Requirement already satisfied: joblib in /usr/local/lib/python3.8/dist-packages (from nltk->llama-index) (1.2.0)\n",
      "Requirement already satisfied: regex>=2021.8.3 in /usr/local/lib/python3.8/dist-packages (from nltk->llama-index) (2022.6.2)\n",
      "Requirement already satisfied: click in /usr/local/lib/python3.8/dist-packages (from nltk->llama-index) (8.1.3)\n",
      "Requirement already satisfied: python-dateutil>=2.7.3 in /usr/local/lib/python3.8/dist-packages (from pandas->llama-index) (2.8.2)\n",
      "Requirement already satisfied: pytz>=2017.3 in /usr/local/lib/python3.8/dist-packages (from pandas->llama-index) (2022.7.1)\n",
      "Collecting huggingface-hub<1.0,>=0.11.0\n",
      "  Downloading huggingface_hub-0.12.1-py3-none-any.whl (190 kB)\n",
      "\u001b[2K     \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m190.3/190.3 KB\u001b[0m \u001b[31m3.5 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
      "\u001b[?25hCollecting tokenizers!=0.11.3,<0.14,>=0.11.1\n",
      "  Downloading tokenizers-0.13.2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (7.6 MB)\n",
      "\u001b[2K     \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m7.6/7.6 MB\u001b[0m \u001b[31m48.5 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
      "\u001b[?25hRequirement already satisfied: packaging>=20.0 in /usr/local/lib/python3.8/dist-packages (from transformers->llama-index) (23.0)\n",
      "Requirement already satisfied: filelock in /usr/local/lib/python3.8/dist-packages (from transformers->llama-index) (3.9.0)\n",
      "Requirement already satisfied: multidict<7.0,>=4.5 in /usr/local/lib/python3.8/dist-packages (from aiohttp->openai>=0.26.4->llama-index) (6.0.4)\n",
      "Requirement already satisfied: attrs>=17.3.0 in /usr/local/lib/python3.8/dist-packages (from aiohttp->openai>=0.26.4->llama-index) (22.2.0)\n",
      "Requirement already satisfied: aiosignal>=1.1.2 in /usr/local/lib/python3.8/dist-packages (from aiohttp->openai>=0.26.4->llama-index) (1.3.1)\n",
      "Requirement already satisfied: frozenlist>=1.1.1 in /usr/local/lib/python3.8/dist-packages (from aiohttp->openai>=0.26.4->llama-index) (1.3.3)\n",
      "Requirement already satisfied: async-timeout<5.0,>=4.0.0a3 in /usr/local/lib/python3.8/dist-packages (from aiohttp->openai>=0.26.4->llama-index) (4.0.2)\n",
      "Requirement already satisfied: charset-normalizer<4.0,>=2.0 in /usr/local/lib/python3.8/dist-packages (from aiohttp->openai>=0.26.4->llama-index) (3.0.1)\n",
      "Requirement already satisfied: yarl<2.0,>=1.0 in /usr/local/lib/python3.8/dist-packages (from aiohttp->openai>=0.26.4->llama-index) (1.8.2)\n",
      "Requirement already satisfied: urllib3>=1.26 in /usr/local/lib/python3.8/dist-packages (from aleph-alpha-client<3.0.0,>=2.15.0->langchain->llama-index) (1.26.14)\n",
      "Collecting aiohttp-retry>=2.8.3\n",
      "  Downloading aiohttp_retry-2.8.3-py3-none-any.whl (9.8 kB)\n",
      "Collecting aiodns>=3.0.0\n",
      "  Downloading aiodns-3.0.0-py3-none-any.whl (5.0 kB)\n",
      "Collecting requests>=2.20\n",
      "  Downloading requests-2.28.2-py3-none-any.whl (62 kB)\n",
      "\u001b[2K     \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m62.8/62.8 KB\u001b[0m \u001b[31m4.7 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
      "\u001b[?25hRequirement already satisfied: pillow in /usr/local/lib/python3.8/dist-packages (from deeplake<4.0.0,>=3.2.9->langchain->llama-index) (8.4.0)\n",
      "Collecting boto3\n",
      "  Downloading boto3-1.26.82-py3-none-any.whl (134 kB)\n",
      "\u001b[2K     \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m134.7/134.7 KB\u001b[0m \u001b[31m6.0 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
      "\u001b[?25hCollecting pathos\n",
      "  Downloading pathos-0.3.0-py3-none-any.whl (79 kB)\n",
      "\u001b[2K     \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m79.8/79.8 KB\u001b[0m \u001b[31m8.9 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
      "\u001b[?25hCollecting humbug>=0.2.6\n",
      "  Downloading humbug-0.2.8-py3-none-any.whl (13 kB)\n",
      "Collecting numcodecs\n",
      "  Downloading numcodecs-0.11.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (6.7 MB)\n",
      "\u001b[2K     \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m6.7/6.7 MB\u001b[0m \u001b[31m41.9 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
      "\u001b[?25hCollecting pyjwt\n",
      "  Downloading PyJWT-2.6.0-py3-none-any.whl (20 kB)\n",
      "Collecting hub>=2.8.7\n",
      "  Downloading hub-3.0.1-py3-none-any.whl (1.4 kB)\n",
      "Requirement already satisfied: typing-extensions>=3.7.4.3 in /usr/local/lib/python3.8/dist-packages (from huggingface-hub<1.0,>=0.11.0->transformers->llama-index) (4.5.0)\n",
      "Requirement already satisfied: six>=1.5 in /usr/local/lib/python3.8/dist-packages (from python-dateutil>=2.7.3->pandas->llama-index) (1.15.0)\n",
      "Requirement already satisfied: idna<4,>=2.5 in /usr/local/lib/python3.8/dist-packages (from requests>=2.20->openai>=0.26.4->llama-index) (2.10)\n",
      "Requirement already satisfied: certifi>=2017.4.17 in /usr/local/lib/python3.8/dist-packages (from requests>=2.20->openai>=0.26.4->llama-index) (2022.12.7)\n",
      "Requirement already satisfied: greenlet!=0.4.17 in /usr/local/lib/python3.8/dist-packages (from SQLAlchemy<2,>=1->langchain->llama-index) (2.0.2)\n",
      "Collecting mypy-extensions>=0.3.0\n",
      "  Downloading mypy_extensions-1.0.0-py3-none-any.whl (4.7 kB)\n",
      "Collecting pycares>=4.0.0\n",
      "  Downloading pycares-4.3.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (288 kB)\n",
      "\u001b[2K     \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m289.0/289.0 KB\u001b[0m \u001b[31m19.6 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
      "\u001b[?25hCollecting s3transfer<0.7.0,>=0.6.0\n",
      "  Downloading s3transfer-0.6.0-py3-none-any.whl (79 kB)\n",
      "\u001b[2K     \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m79.6/79.6 KB\u001b[0m \u001b[31m6.2 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
      "\u001b[?25hCollecting botocore<1.30.0,>=1.29.82\n",
      "  Downloading botocore-1.29.82-py3-none-any.whl (10.5 MB)\n",
      "\u001b[2K     \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m10.5/10.5 MB\u001b[0m \u001b[31m69.2 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
      "\u001b[?25hCollecting jmespath<2.0.0,>=0.7.1\n",
      "  Downloading jmespath-1.0.1-py3-none-any.whl (20 kB)\n",
      "Requirement already satisfied: entrypoints in /usr/local/lib/python3.8/dist-packages (from numcodecs->deeplake<4.0.0,>=3.2.9->langchain->llama-index) (0.4)\n",
      "Collecting ppft>=1.7.6.6\n",
      "  Downloading ppft-1.7.6.6-py3-none-any.whl (52 kB)\n",
      "\u001b[2K     \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m52.8/52.8 KB\u001b[0m \u001b[31m4.1 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
      "\u001b[?25hCollecting pox>=0.3.2\n",
      "  Downloading pox-0.3.2-py3-none-any.whl (29 kB)\n",
      "Requirement already satisfied: dill>=0.3.6 in /usr/local/lib/python3.8/dist-packages (from pathos->deeplake<4.0.0,>=3.2.9->langchain->llama-index) (0.3.6)\n",
      "Collecting multiprocess>=0.70.14\n",
      "  Downloading multiprocess-0.70.14-py38-none-any.whl (132 kB)\n",
      "\u001b[2K     \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m132.0/132.0 KB\u001b[0m \u001b[31m10.0 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
      "\u001b[?25hRequirement already satisfied: cffi>=1.5.0 in /usr/local/lib/python3.8/dist-packages (from pycares>=4.0.0->aiodns>=3.0.0->aleph-alpha-client<3.0.0,>=2.15.0->langchain->llama-index) (1.15.1)\n",
      "Requirement already satisfied: pycparser in /usr/local/lib/python3.8/dist-packages (from cffi>=1.5.0->pycares>=4.0.0->aiodns>=3.0.0->aleph-alpha-client<3.0.0,>=2.15.0->langchain->llama-index) (2.21)\n",
      "Building wheels for collected packages: llama-index, deeplake\n",
      "  Building wheel for llama-index (setup.py) ... \u001b[?25l\u001b[?25hdone\n",
      "  Created wheel for llama-index: filename=llama_index-0.4.17-py3-none-any.whl size=182750 sha256=67cb3c836e93d9d29a73307c2393d49392a4c8ceae94be552e0a91ca4b1d2cf1\n",
      "  Stored in directory: /root/.cache/pip/wheels/15/bb/a9/de82e6a211b5f22899972226d5164f91546e6ac016bbd6c248\n",
      "  Building wheel for deeplake (setup.py) ... \u001b[?25l\u001b[?25hdone\n",
      "  Created wheel for deeplake: filename=deeplake-3.2.12-py3-none-any.whl size=534308 sha256=b49c2dd3396d018a03f60c580ca9f15903b45507d648336b281f36605cb7950f\n",
      "  Stored in directory: /root/.cache/pip/wheels/4b/1a/74/4b341aa1a16e01324c9728738ff705c049c3fa2a09e40d3d9f\n",
      "Successfully built llama-index deeplake\n",
      "Installing collected packages: tokenizers, tenacity, requests, pyjwt, ppft, pox, numcodecs, mypy-extensions, multiprocess, jmespath, typing-inspect, pycares, pathos, marshmallow-enum, humbug, huggingface-hub, botocore, transformers, s3transfer, openai, dataclasses_json, aiohttp-retry, aiodns, boto3, aleph-alpha-client, hub, deeplake, langchain, llama-index\n",
      "  Attempting uninstall: tenacity\n",
      "    Found existing installation: tenacity 8.2.1\n",
      "    Uninstalling tenacity-8.2.1:\n",
      "      Successfully uninstalled tenacity-8.2.1\n",
      "  Attempting uninstall: requests\n",
      "    Found existing installation: requests 2.25.1\n",
      "    Uninstalling requests-2.25.1:\n",
      "      Successfully uninstalled requests-2.25.1\n",
      "Successfully installed aiodns-3.0.0 aiohttp-retry-2.8.3 aleph-alpha-client-2.16.0 boto3-1.26.82 botocore-1.29.82 dataclasses_json-0.5.7 deeplake-3.2.12 hub-3.0.1 huggingface-hub-0.12.1 humbug-0.2.8 jmespath-1.0.1 langchain-0.0.98 llama-index-0.4.17 marshmallow-enum-1.5.1 multiprocess-0.70.14 mypy-extensions-1.0.0 numcodecs-0.11.0 openai-0.27.0 pathos-0.3.0 pox-0.3.2 ppft-1.7.6.6 pycares-4.3.0 pyjwt-2.6.0 requests-2.28.2 s3transfer-0.6.0 tenacity-8.1.0 tokenizers-0.13.2 transformers-4.26.1 typing-inspect-0.8.0\n"
     ]
    }
   ],
   "source": [
    "!pip install llama-index"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "d35ov8dk_6WP",
   "metadata": {},
   "outputs": [],
   "source": [
    "# My OpenAI Key\n",
    "import os\n",
    "\n",
    "os.environ[\"OPENAI_API_KEY\"] = \"\""
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "fa0e62b6",
   "metadata": {},
   "outputs": [],
   "source": [
    "import logging\n",
    "import sys\n",
    "\n",
    "logging.basicConfig(stream=sys.stdout, level=logging.INFO)\n",
    "logging.getLogger().addHandler(logging.StreamHandler(stream=sys.stdout))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "e27b0473-4bda-47f0-b6ed-fd482eac1a13",
   "metadata": {},
   "outputs": [],
   "source": [
    "from llama_index import (\n",
    "    VectorStoreIndex,\n",
    "    SimpleKeywordTableIndex,\n",
    "    SummaryIndex,\n",
    "    SimpleDirectoryReader,\n",
    "    ServiceContext,\n",
    ")\n",
    "from llama_index.llms import OpenAI\n",
    "import requests"
   ]
  },
  {
   "attachments": {},
   "cell_type": "markdown",
   "id": "49e0d841-680f-4a0c-b455-788b54978ebf",
   "metadata": {},
   "source": [
    "#### Load Datasets\n",
    "\n",
    "Load Wikipedia pages as well as Paul Graham's \"What I Worked On\" essay"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "fc4692a1",
   "metadata": {},
   "outputs": [],
   "source": [
    "wiki_titles = [\n",
    "    \"Toronto\",\n",
    "    \"Seattle\",\n",
    "    \"San Francisco\",\n",
    "    \"Chicago\",\n",
    "    \"Boston\",\n",
    "    \"Washington, D.C.\",\n",
    "    \"Cambridge, Massachusetts\",\n",
    "    \"Houston\",\n",
    "]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "9ec16a8b-6aae-4bf7-9b83-b82087b4ea52",
   "metadata": {},
   "outputs": [],
   "source": [
    "from pathlib import Path\n",
    "\n",
    "import requests\n",
    "\n",
    "for title in wiki_titles:\n",
    "    response = requests.get(\n",
    "        \"https://en.wikipedia.org/w/api.php\",\n",
    "        params={\n",
    "            \"action\": \"query\",\n",
    "            \"format\": \"json\",\n",
    "            \"titles\": title,\n",
    "            \"prop\": \"extracts\",\n",
    "            # 'exintro': True,\n",
    "            \"explaintext\": True,\n",
    "        },\n",
    "    ).json()\n",
    "    page = next(iter(response[\"query\"][\"pages\"].values()))\n",
    "    wiki_text = page[\"extract\"]\n",
    "\n",
    "    data_path = Path(\"data\")\n",
    "    if not data_path.exists():\n",
    "        Path.mkdir(data_path)\n",
    "\n",
    "    with open(data_path / f\"{title}.txt\", \"w\") as fp:\n",
    "        fp.write(wiki_text)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "39c00aeb-adef-4ce3-8134-031de18e64ea",
   "metadata": {},
   "outputs": [],
   "source": [
    "# Load all wiki documents\n",
    "city_docs = {}\n",
    "for wiki_title in wiki_titles:\n",
    "    city_docs[wiki_title] = SimpleDirectoryReader(\n",
    "        input_files=[f\"data/{wiki_title}.txt\"]\n",
    "    ).load_data()"
   ]
  },
  {
   "attachments": {},
   "cell_type": "markdown",
   "id": "f1782198-c0de-4679-8951-1297c21b8639",
   "metadata": {},
   "source": [
    "### Building the document indices\n",
    "Build a vector index for the wiki pages about cities and persons, and PG essay"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "M0GylZB-C2zL",
   "metadata": {},
   "outputs": [],
   "source": [
    "# LLM Predictor (text-davinci-003)\n",
    "davinci = OpenAI(temperature=0, model=\"text-davinci-003\")\n",
    "service_context_davinci = ServiceContext.from_defaults(llm=davinci)\n",
    "\n",
    "# # LLM Predictor (gpt-3.5-turbo)\n",
    "chatgpt = OpenAI(temperature=0, model=\"gpt-3.5-turbo\")\n",
    "service_context_chatgpt = ServiceContext.from_defaults(llm=chatgpt)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "5431e83e-428b-4473-bad1-24b7a6c4db38",
   "metadata": {},
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "INFO:llama_index.token_counter.token_counter:> [build_index_from_nodes] Total LLM token usage: 0 tokens\n",
      "INFO:llama_index.token_counter.token_counter:> [build_index_from_nodes] Total embedding token usage: 17592 tokens\n",
      "INFO:llama_index.token_counter.token_counter:> [build_index_from_nodes] Total LLM token usage: 0 tokens\n",
      "INFO:llama_index.token_counter.token_counter:> [build_index_from_nodes] Total embedding token usage: 14402 tokens\n",
      "INFO:llama_index.token_counter.token_counter:> [build_index_from_nodes] Total LLM token usage: 0 tokens\n",
      "INFO:llama_index.token_counter.token_counter:> [build_index_from_nodes] Total embedding token usage: 19954 tokens\n",
      "INFO:llama_index.token_counter.token_counter:> [build_index_from_nodes] Total LLM token usage: 0 tokens\n",
      "INFO:llama_index.token_counter.token_counter:> [build_index_from_nodes] Total embedding token usage: 22057 tokens\n",
      "INFO:llama_index.token_counter.token_counter:> [build_index_from_nodes] Total LLM token usage: 0 tokens\n",
      "INFO:llama_index.token_counter.token_counter:> [build_index_from_nodes] Total embedding token usage: 15733 tokens\n",
      "INFO:llama_index.token_counter.token_counter:> [build_index_from_nodes] Total LLM token usage: 0 tokens\n",
      "INFO:llama_index.token_counter.token_counter:> [build_index_from_nodes] Total embedding token usage: 18327 tokens\n",
      "INFO:llama_index.token_counter.token_counter:> [build_index_from_nodes] Total LLM token usage: 0 tokens\n",
      "INFO:llama_index.token_counter.token_counter:> [build_index_from_nodes] Total embedding token usage: 10999 tokens\n",
      "INFO:llama_index.token_counter.token_counter:> [build_index_from_nodes] Total LLM token usage: 0 tokens\n",
      "INFO:llama_index.token_counter.token_counter:> [build_index_from_nodes] Total embedding token usage: 18480 tokens\n"
     ]
    }
   ],
   "source": [
    "# Build city document index\n",
    "city_indices = {}\n",
    "for wiki_title in wiki_titles:\n",
    "    city_indices[wiki_title] = VectorStoreIndex.from_documents(\n",
    "        city_docs[wiki_title]\n",
    "    )"
   ]
  },
  {
   "attachments": {},
   "cell_type": "markdown",
   "id": "d4d3cd8b-4134-4cfa-8002-e0a34694d2e1",
   "metadata": {},
   "source": [
    "### Build Graph: Keyword Table Index on top of vector indices! \n",
    "\n",
    "We compose a keyword table index on top of all the vector indices."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "be1e3d7d-c4a3-4268-9408-b3cb984ffa4a",
   "metadata": {},
   "outputs": [],
   "source": [
    "# set summaries for each city\n",
    "index_summaries = {}\n",
    "for wiki_title in wiki_titles:\n",
    "    # set summary text for city\n",
    "    index_summaries[wiki_title] = f\"Wikipedia articles about {wiki_title}\""
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "ddc2e4de-0719-4607-86f8-18c953344199",
   "metadata": {},
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "INFO:llama_index.token_counter.token_counter:> [build_index_from_nodes] Total LLM token usage: 0 tokens\n",
      "INFO:llama_index.token_counter.token_counter:> [build_index_from_nodes] Total embedding token usage: 0 tokens\n"
     ]
    }
   ],
   "source": [
    "from llama_index.indices.composability import ComposableGraph\n",
    "\n",
    "graph = ComposableGraph.from_indices(\n",
    "    SimpleKeywordTableIndex,\n",
    "    [index for _, index in city_indices.items()],\n",
    "    [summary for _, summary in index_summaries.items()],\n",
    "    max_keywords_per_chunk=50,\n",
    ")"
   ]
  },
  {
   "attachments": {},
   "cell_type": "markdown",
   "id": "49c900ee-a31f-4fcd-bb44-ff2cd12a41eb",
   "metadata": {},
   "source": [
    "### Compare Queries (text-davinci-003 vs. ChatGPT)"
   ]
  },
  {
   "attachments": {},
   "cell_type": "markdown",
   "id": "e0a8fa6a-e96e-4341-bb43-7547415f766e",
   "metadata": {},
   "source": [
    "**Simple Query**"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "OVnzf3myEz88",
   "metadata": {},
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "INFO:llama_index.indices.keyword_table.retrievers:> Starting query: Tell me more about Boston\n",
      "INFO:llama_index.indices.keyword_table.retrievers:query keywords: ['tell', 'boston']\n",
      "INFO:llama_index.indices.keyword_table.retrievers:> Extracted keywords: ['boston']\n",
      "INFO:llama_index.token_counter.token_counter:> [retrieve] Total LLM token usage: 0 tokens\n",
      "INFO:llama_index.token_counter.token_counter:> [retrieve] Total embedding token usage: 5 tokens\n",
      "INFO:llama_index.indices.common_tree.base:> Building index from nodes: 1 chunks\n",
      "INFO:llama_index.token_counter.token_counter:> [get_response] Total LLM token usage: 802 tokens\n",
      "INFO:llama_index.token_counter.token_counter:> [get_response] Total embedding token usage: 0 tokens\n",
      "INFO:llama_index.token_counter.token_counter:> [get_response] Total LLM token usage: 4801 tokens\n",
      "INFO:llama_index.token_counter.token_counter:> [get_response] Total embedding token usage: 0 tokens\n",
      "INFO:llama_index.token_counter.token_counter:> [get_response] Total LLM token usage: 545 tokens\n",
      "INFO:llama_index.token_counter.token_counter:> [get_response] Total embedding token usage: 0 tokens\n",
      "INFO:llama_index.token_counter.token_counter:> [get_response] Total LLM token usage: 545 tokens\n",
      "INFO:llama_index.token_counter.token_counter:> [get_response] Total embedding token usage: 0 tokens\n",
      "INFO:llama_index.indices.keyword_table.retrievers:> Starting query: Tell me more about Boston\n",
      "INFO:llama_index.indices.keyword_table.retrievers:query keywords: ['tell', 'boston']\n",
      "INFO:llama_index.indices.keyword_table.retrievers:> Extracted keywords: ['boston']\n",
      "INFO:llama_index.token_counter.token_counter:> [retrieve] Total LLM token usage: 0 tokens\n",
      "INFO:llama_index.token_counter.token_counter:> [retrieve] Total embedding token usage: 5 tokens\n",
      "INFO:llama_index.indices.common_tree.base:> Building index from nodes: 1 chunks\n",
      "INFO:llama_index.token_counter.token_counter:> [get_response] Total LLM token usage: 641 tokens\n",
      "INFO:llama_index.token_counter.token_counter:> [get_response] Total embedding token usage: 0 tokens\n",
      "INFO:llama_index.token_counter.token_counter:> [get_response] Total LLM token usage: 4580 tokens\n",
      "INFO:llama_index.token_counter.token_counter:> [get_response] Total embedding token usage: 0 tokens\n",
      "INFO:llama_index.token_counter.token_counter:> [get_response] Total LLM token usage: 308 tokens\n",
      "INFO:llama_index.token_counter.token_counter:> [get_response] Total embedding token usage: 0 tokens\n",
      "INFO:llama_index.token_counter.token_counter:> [get_response] Total LLM token usage: 308 tokens\n",
      "INFO:llama_index.token_counter.token_counter:> [get_response] Total embedding token usage: 0 tokens\n"
     ]
    }
   ],
   "source": [
    "query_engine_davinci = graph.as_query_engine(\n",
    "    custom_query_engines={\n",
    "        graph.root_index.index_id: graph.root_index.as_query_engine(\n",
    "            retriever_mode=\"simple\",\n",
    "            service_context=service_context_davinci,\n",
    "            response_mode=\"tree_summarize\",\n",
    "        )\n",
    "    }\n",
    ")\n",
    "query_engine_chatgpt = graph.as_query_engine(\n",
    "    custom_query_engines={\n",
    "        graph.root_index.index_id: graph.root_index.as_query_engine(\n",
    "            retriever_mode=\"simple\",\n",
    "            service_context=service_context_chatgpt,\n",
    "            response_mode=\"tree_summarize\",\n",
    "        )\n",
    "    }\n",
    ")\n",
    "query_str = \"Tell me more about Boston\"\n",
    "response_davinci = query_engine_davinci.query(query_str)\n",
    "response_chatgpt = query_engine_chatgpt.query(query_str)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "6f5f5467-fa79-4f48-8b78-32ae8f86d12d",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "\n",
      "Boston is the capital and largest city of the Commonwealth of Massachusetts and the cultural and financial center of the New England region of the Northeastern United States. It is one of the oldest municipalities in America, founded on the Shawmut Peninsula in 1630 by Puritan settlers from the English town of the same name. It is a center of scientific research and innovation, with nearly 5,000 startups, and is home to a number of colleges and universities, notably Harvard and MIT. It has a long seafaring tradition, and was a major port for both domestic and international trade in the 19th century. It has seen waves of immigration, with Irish, Germans, Lebanese, Syrians, French Canadians, and Russian and Polish Jews settling in the city. It was an early port of the Atlantic triangular slave trade in the New England colonies, but was soon overtaken. Boston is also known for its philanthropy, with households in the city claiming the highest average rate of philanthropy in the United States.\n"
     ]
    }
   ],
   "source": [
    "print(response_davinci)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "29f32345-6f28-4545-afa9-e3c5849dfb82",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Boston is a city in the New England region of the United States with a population of 675,647 as of 2020. It is known for its rich history and is considered the economic and cultural center of the region. The city has many firsts, including the first public park, first public or state school, first subway system, and first large public library in the United States. Boston is also a global pioneer in innovation and entrepreneurship, with nearly 5,000 startups. The city's economy includes finance, professional and business services, biotechnology, information technology, and government activities. Boston is a popular tourist destination, with Faneuil Hall alone drawing more than 20 million visitors per year. The city is home to many prestigious hospitals and universities, including Massachusetts General Hospital, Harvard Medical School, and Boston University.\n"
     ]
    }
   ],
   "source": [
    "print(response_chatgpt)"
   ]
  },
  {
   "attachments": {},
   "cell_type": "markdown",
   "id": "018d0a51-3a3f-4dc5-9e1d-f2e79eb0cc43",
   "metadata": {},
   "source": [
    "**Complex Query 1**"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "730b7a1f-5197-4cdf-add2-9b46c07465f3",
   "metadata": {},
   "outputs": [],
   "source": [
    "query_str = (\n",
    "    \"Tell me the airports in Seattle, Houston, and Toronto. If only one city\"\n",
    "    \" is provided, return the airport information for that city. If airports\"\n",
    "    \" for multiple cities are provided, compare and contrast the airports. \"\n",
    ")\n",
    "response_davinci = query_engine_davinci.query(query_str)\n",
    "response_chatgpt = query_engine_chatgpt.query(query_str)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "ee57efaa-dd8e-45af-968c-45d9bf92b948",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "\n",
      "The airports in Seattle, Houston, and Toronto are Seattle–Tacoma International Airport (IATA: SEA), George Bush Intercontinental Airport (IATA: IAH), Toronto Pearson International Airport (IATA: YYZ), and Billy Bishop Toronto City Airport (IATA: YTZ). Seattle–Tacoma International Airport is the largest airport in the Pacific Northwest region of the United States, serving over 44 million passengers annually. George Bush Intercontinental Airport is the largest airport in Houston, serving over 40 million passengers annually. Toronto Pearson International Airport is the busiest airport in Canada, serving over 50 million passengers annually. Billy Bishop Toronto City Airport is a smaller airport located on the Toronto Islands, serving over 2 million passengers annually.\n"
     ]
    }
   ],
   "source": [
    "print(response_davinci)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "e499b388-5a1c-4047-8fee-122dfe73c800",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Airports in Seattle: Seattle-Tacoma International Airport.\n",
      "Airports in Houston: George Bush Intercontinental Airport, William P. Hobby Airport, and Ellington Airport.\n",
      "Airports in Toronto: Toronto Pearson International Airport, Billy Bishop Toronto City Airport, Buttonville Municipal Airport, and Downsview Airport.\n",
      "\n",
      "Seattle has one major airport, Seattle-Tacoma International Airport. Houston has three airports: George Bush Intercontinental Airport, William P. Hobby Airport, and Ellington Airport. Toronto has four airports: Toronto Pearson International Airport, Billy Bishop Toronto City Airport, Buttonville Municipal Airport, and Downsview Airport. Toronto has a mix of commercial and smaller airports, while Houston has a mix of commercial, military, government, and general aviation airports.\n"
     ]
    }
   ],
   "source": [
    "print(response_chatgpt)"
   ]
  },
  {
   "attachments": {},
   "cell_type": "markdown",
   "id": "d3cb4d7b-7bcc-46bf-b7d6-d0230c3d7fdd",
   "metadata": {},
   "source": [
    "**Complex Query 2**"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "a0fa2840-77b2-42c3-b6af-39fbe02c78ce",
   "metadata": {},
   "outputs": [],
   "source": [
    "query_str = (\n",
    "    \"Look at Houston and Boston. If only one city is provided, provide\"\n",
    "    \" information about the sports teams for that city. If context for\"\n",
    "    \" multiple cities are provided, compare and contrast the sports\"\n",
    "    \" environment of the cities. \"\n",
    ")\n",
    "response_davinci = query_engine_davinci.query(query_str)\n",
    "response_chatgpt = query_engine_chatgpt.query(query_str)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "3af1e27f-7697-4cbc-ba38-a7dc11330dc0",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "\n",
      "Houston has teams for every major professional league. The Houston Astros are a Major League Baseball team that have won the World Series in 2017, 2022, and appeared in it in 2005, 2019, and 2021. The Houston Rockets are a National Basketball Association franchise based in the city since 1971, and have won two NBA Championships. The Houston Texans are a National Football League expansion team formed in 2002, and the Houston Dynamo is a Major League Soccer franchise that has been based in Houston since 2006, winning two MLS Cup titles. The Houston Dash team plays in the National Women's Soccer League, and the Houston SaberCats are a rugby team that plays in Major League Rugby. \n",
      "\n",
      "Boston also has teams for every major professional league. The Boston Red Sox are a Major League Baseball team that have won the World Series in 2004, 2007, 2013, and 2018. The Boston Celtics are a National Basketball Association team that have won 17 championships, most recently in 2008. The Boston Bruins are a National Hockey League team that have won six Stanley Cup championships, most recently in 2011. The New England Revolution is a Major League Soccer team that has been based in Boston since 1996. During a particularly impressive 17-year stretch from 2001 to 2018, the city's professional sports teams won twelve championships\n"
     ]
    }
   ],
   "source": [
    "print(response_davinci)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "226ee4f5-c941-4497-a04c-630757622282",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "If only one city is provided, Houston has sports teams for every major professional league except the National Hockey League, including the Houston Astros (MLB), Houston Rockets (NBA), Houston Texans (NFL), Houston Dynamo (MLS), Houston Dash (National Women's Soccer League), and Houston SaberCats (rugby).\n",
      "\n",
      "If context for multiple cities are provided, Boston has teams in the four major North American men's professional sports leagues plus Major League Soccer, and has won 39 championships in these leagues. Boston is one of eight cities to have won championships in all four major American sports leagues. During a particularly impressive 17-year stretch from 2001 to 2018, the city's professional sports teams won twelve championships. The Celtics and Bruins remain competitive for titles in the century’s third decade, though the Patriots and Red Sox have fallen off from these recent glory days. In contrast, Houston has not won as many championships as Boston, but has hosted several major sports events, including the Super Bowl and World Series. Houston is also home to the first major esports team, the Houston Outlaws.\n"
     ]
    }
   ],
   "source": [
    "print(response_chatgpt)"
   ]
  },
  {
   "attachments": {},
   "cell_type": "markdown",
   "id": "53f527c8-0d53-4b29-8f1f-7b5bf22ca55e",
   "metadata": {},
   "source": [
    "**Complex Query 3**"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "5b11d9c6-1905-4bd1-bb9a-4d60b0bc3c2d",
   "metadata": {},
   "outputs": [],
   "source": [
    "query_str = (\n",
    "    \"Look at Houston and Boston. If only one city is provided, provide\"\n",
    "    \" information about the arts and culture for that city. If context for\"\n",
    "    \" multiple cities are provided, compare and contrast the arts and culture\"\n",
    "    \" of the two cities. \"\n",
    ")\n",
    "response_davinci = query_engine_davinci.query(query_str)\n",
    "response_chatgpt = query_engine_chatgpt.query(query_str)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "4ccbbcf6-3074-4d8e-9ad4-92daa13a67dc",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "\n",
      "Houston and Boston both have a wide range of cultural attractions. In Houston, the Theater District is a 17-block area in the center of Downtown Houston that is home to the Bayou Place entertainment complex, restaurants, movies, plazas, and parks. The Museum District's cultural institutions and exhibits attract more than 7 million visitors a year. Notable facilities include The Museum of Fine Arts, the Houston Museum of Natural Science, the Contemporary Arts Museum Houston, the Station Museum of Contemporary Art, the Holocaust Museum Houston, the Children's Museum of Houston, and the Houston Zoo. Houston also has many annual events celebrating the diverse cultures of the city, such as the Houston Livestock Show and Rodeo, the Houston Gay Pride Parade, the Houston Greek Festival, Art Car Parade, the Houston Auto Show, the Houston International Festival, and the Bayou City Art Festival.\n",
      "\n",
      "In Boston, the Freedom Trail is a 2.5-mile walking tour of 16 historically significant sites in downtown Boston. The Museum of Fine Arts is one of the largest and most comprehensive art museums in the world, with more than 450,000 works of art. Boston also has many annual events celebrating the diverse cultures of the city, such as the Boston Marathon, the Boston Arts Festival\n"
     ]
    }
   ],
   "source": [
    "print(response_davinci)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "10c6ca94-c053-4009-b52d-a5255e74853c",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "There is no information about the arts and culture of Houston provided, but for Boston, there is a rich cultural history with a strong literary culture and a center for classical music. The city is also home to several art museums and galleries, including the Museum of Fine Arts and the Isabella Stewart Gardner Museum. The Institute of Contemporary Art is housed in a contemporary building designed by Diller Scofidio + Renfro in the Seaport District. Boston's South End Art and Design District (SoWa) and Newbury St. are both art gallery destinations.\n"
     ]
    }
   ],
   "source": [
    "print(response_chatgpt)"
   ]
  },
  {
   "attachments": {},
   "cell_type": "markdown",
   "id": "7b299ebe-cdbd-4abf-9015-4894f6aa94ba",
   "metadata": {},
   "source": [
    "**Complex Query 4**"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "261e3881-6414-4ace-9816-aa71a39051b5",
   "metadata": {},
   "outputs": [],
   "source": [
    "query_str = (\n",
    "    \"Look at Toronto and San Francisco. If only one city is provided, provide\"\n",
    "    \" information about the demographics for that city. If context for\"\n",
    "    \" multiple cities are provided, compare and contrast the demographics of\"\n",
    "    \" the two cities. \"\n",
    ")\n",
    "response_davinci = query_engine_davinci.query(query_str)\n",
    "response_chatgpt = query_engine_chatgpt.query(query_str)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "f58ca597-8a40-4fa0-995b-f54cff133ec8",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "\n",
      "In Toronto, the population is 2,731,571 people, with a median age of 39.2 years. The racial makeup of the city is 51.5% White, 20.3% Asian, 8.6% African American, 0.8% Native American, 0.2% Pacific Islander, and 18.6% from other races. The city is also home to a large Hispanic population, making up 6.2% of the population. The three most commonly reported ethnic origins are White (46.9%), Asian (20.3%), and Black (8.6%). Christianity is the most commonly reported religion (48.4%), followed by no religion and secular perspectives (31.2%). English is the predominant language spoken by Torontonians with approximately 79% of residents having proficiency in the language, although only 43.2% of Torontonians reported English as their mother tongue.\n",
      "\n",
      "When comparing Toronto and San Francisco, we can see that Toronto has a larger population than San Francisco, with a median age that is slightly higher. The racial makeup of Toronto is slightly more White than San Francisco, while San Francisco has a larger Asian population. The Hispanic population is larger in San Francisco than in Toronto. Christianity is the\n"
     ]
    }
   ],
   "source": [
    "print(response_davinci)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "c4fca866-b5fd-493b-8e2f-33dbe485c463",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Only information about Toronto is provided in the context, so demographics for Toronto can be provided. However, there is no context information about San Francisco to compare and contrast with Toronto.\n"
     ]
    }
   ],
   "source": [
    "print(response_chatgpt)"
   ]
  }
 ],
 "metadata": {
  "colab": {
   "provenance": []
  },
  "kernelspec": {
   "display_name": "llama",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3"
  },
  "widgets": {
   "application/vnd.jupyter.widget-state+json": {
    "026cc1a42e154f1f92b5236869311929": {
     "model_module": "@jupyter-widgets/controls",
     "model_module_version": "1.5.0",
     "model_name": "FloatProgressModel",
     "state": {
      "_dom_classes": [],
      "_model_module": "@jupyter-widgets/controls",
      "_model_module_version": "1.5.0",
      "_model_name": "FloatProgressModel",
      "_view_count": null,
      "_view_module": "@jupyter-widgets/controls",
      "_view_module_version": "1.5.0",
      "_view_name": "ProgressView",
      "bar_style": "success",
      "description": "",
      "description_tooltip": null,
      "layout": "IPY_MODEL_4cc9ec6ba46647aba2d53e352f91c137",
      "max": 665,
      "min": 0,
      "orientation": "horizontal",
      "style": "IPY_MODEL_f2a1c5087d0e44909139697ed90474e8",
      "value": 665
     }
    },
    "028aa5d1f7a74d538b5c606d4a6d146f": {
     "model_module": "@jupyter-widgets/base",
     "model_module_version": "1.2.0",
     "model_name": "LayoutModel",
     "state": {
      "_model_module": "@jupyter-widgets/base",
      "_model_module_version": "1.2.0",
      "_model_name": "LayoutModel",
      "_view_count": null,
      "_view_module": "@jupyter-widgets/base",
      "_view_module_version": "1.2.0",
      "_view_name": "LayoutView",
      "align_content": null,
      "align_items": null,
      "align_self": null,
      "border": null,
      "bottom": null,
      "display": null,
      "flex": null,
      "flex_flow": null,
      "grid_area": null,
      "grid_auto_columns": null,
      "grid_auto_flow": null,
      "grid_auto_rows": null,
      "grid_column": null,
      "grid_gap": null,
      "grid_row": null,
      "grid_template_areas": null,
      "grid_template_columns": null,
      "grid_template_rows": null,
      "height": null,
      "justify_content": null,
      "justify_items": null,
      "left": null,
      "margin": null,
      "max_height": null,
      "max_width": null,
      "min_height": null,
      "min_width": null,
      "object_fit": null,
      "object_position": null,
      "order": null,
      "overflow": null,
      "overflow_x": null,
      "overflow_y": null,
      "padding": null,
      "right": null,
      "top": null,
      "visibility": null,
      "width": null
     }
    },
    "119d6d7a8d524aa49170f5784ebc6b9e": {
     "model_module": "@jupyter-widgets/controls",
     "model_module_version": "1.5.0",
     "model_name": "DescriptionStyleModel",
     "state": {
      "_model_module": "@jupyter-widgets/controls",
      "_model_module_version": "1.5.0",
      "_model_name": "DescriptionStyleModel",
      "_view_count": null,
      "_view_module": "@jupyter-widgets/base",
      "_view_module_version": "1.2.0",
      "_view_name": "StyleView",
      "description_width": ""
     }
    },
    "1bdaf4dab16f48dbaeed3fb9bf268e45": {
     "model_module": "@jupyter-widgets/controls",
     "model_module_version": "1.5.0",
     "model_name": "HTMLModel",
     "state": {
      "_dom_classes": [],
      "_model_module": "@jupyter-widgets/controls",
      "_model_module_version": "1.5.0",
      "_model_name": "HTMLModel",
      "_view_count": null,
      "_view_module": "@jupyter-widgets/controls",
      "_view_module_version": "1.5.0",
      "_view_name": "HTMLView",
      "description": "",
      "description_tooltip": null,
      "layout": "IPY_MODEL_028aa5d1f7a74d538b5c606d4a6d146f",
      "placeholder": "​",
      "style": "IPY_MODEL_c078fe9a056a473dab7d474cd7907154",
      "value": "Downloading (…)lve/main/config.json: 100%"
     }
    },
    "2053e6adef1b4dba89f861eaf3d916fd": {
     "model_module": "@jupyter-widgets/controls",
     "model_module_version": "1.5.0",
     "model_name": "DescriptionStyleModel",
     "state": {
      "_model_module": "@jupyter-widgets/controls",
      "_model_module_version": "1.5.0",
      "_model_name": "DescriptionStyleModel",
      "_view_count": null,
      "_view_module": "@jupyter-widgets/base",
      "_view_module_version": "1.2.0",
      "_view_name": "StyleView",
      "description_width": ""
     }
    },
    "208d404f405a42a3b06d65ad67fb7322": {
     "model_module": "@jupyter-widgets/controls",
     "model_module_version": "1.5.0",
     "model_name": "HTMLModel",
     "state": {
      "_dom_classes": [],
      "_model_module": "@jupyter-widgets/controls",
      "_model_module_version": "1.5.0",
      "_model_name": "HTMLModel",
      "_view_count": null,
      "_view_module": "@jupyter-widgets/controls",
      "_view_module_version": "1.5.0",
      "_view_name": "HTMLView",
      "description": "",
      "description_tooltip": null,
      "layout": "IPY_MODEL_3fef46c902524717b377dee6c1dfc929",
      "placeholder": "​",
      "style": "IPY_MODEL_fd8b887c1f7149f2876cf8a31e534ad6",
      "value": "Downloading (…)olve/main/vocab.json: 100%"
     }
    },
    "380a0c11434241b191b17421e395be8b": {
     "model_module": "@jupyter-widgets/base",
     "model_module_version": "1.2.0",
     "model_name": "LayoutModel",
     "state": {
      "_model_module": "@jupyter-widgets/base",
      "_model_module_version": "1.2.0",
      "_model_name": "LayoutModel",
      "_view_count": null,
      "_view_module": "@jupyter-widgets/base",
      "_view_module_version": "1.2.0",
      "_view_name": "LayoutView",
      "align_content": null,
      "align_items": null,
      "align_self": null,
      "border": null,
      "bottom": null,
      "display": null,
      "flex": null,
      "flex_flow": null,
      "grid_area": null,
      "grid_auto_columns": null,
      "grid_auto_flow": null,
      "grid_auto_rows": null,
      "grid_column": null,
      "grid_gap": null,
      "grid_row": null,
      "grid_template_areas": null,
      "grid_template_columns": null,
      "grid_template_rows": null,
      "height": null,
      "justify_content": null,
      "justify_items": null,
      "left": null,
      "margin": null,
      "max_height": null,
      "max_width": null,
      "min_height": null,
      "min_width": null,
      "object_fit": null,
      "object_position": null,
      "order": null,
      "overflow": null,
      "overflow_x": null,
      "overflow_y": null,
      "padding": null,
      "right": null,
      "top": null,
      "visibility": null,
      "width": null
     }
    },
    "398f1c0f56fe4f218d999df138adfdac": {
     "model_module": "@jupyter-widgets/base",
     "model_module_version": "1.2.0",
     "model_name": "LayoutModel",
     "state": {
      "_model_module": "@jupyter-widgets/base",
      "_model_module_version": "1.2.0",
      "_model_name": "LayoutModel",
      "_view_count": null,
      "_view_module": "@jupyter-widgets/base",
      "_view_module_version": "1.2.0",
      "_view_name": "LayoutView",
      "align_content": null,
      "align_items": null,
      "align_self": null,
      "border": null,
      "bottom": null,
      "display": null,
      "flex": null,
      "flex_flow": null,
      "grid_area": null,
      "grid_auto_columns": null,
      "grid_auto_flow": null,
      "grid_auto_rows": null,
      "grid_column": null,
      "grid_gap": null,
      "grid_row": null,
      "grid_template_areas": null,
      "grid_template_columns": null,
      "grid_template_rows": null,
      "height": null,
      "justify_content": null,
      "justify_items": null,
      "left": null,
      "margin": null,
      "max_height": null,
      "max_width": null,
      "min_height": null,
      "min_width": null,
      "object_fit": null,
      "object_position": null,
      "order": null,
      "overflow": null,
      "overflow_x": null,
      "overflow_y": null,
      "padding": null,
      "right": null,
      "top": null,
      "visibility": null,
      "width": null
     }
    },
    "3b4c1066797b43a586611ec2d63e7ca1": {
     "model_module": "@jupyter-widgets/controls",
     "model_module_version": "1.5.0",
     "model_name": "HBoxModel",
     "state": {
      "_dom_classes": [],
      "_model_module": "@jupyter-widgets/controls",
      "_model_module_version": "1.5.0",
      "_model_name": "HBoxModel",
      "_view_count": null,
      "_view_module": "@jupyter-widgets/controls",
      "_view_module_version": "1.5.0",
      "_view_name": "HBoxView",
      "box_style": "",
      "children": [
       "IPY_MODEL_c06865c1e01a441698dacf48600dd03c",
       "IPY_MODEL_9d229e5dd56e4d539ca2c1b9f0a37812",
       "IPY_MODEL_868aa268dd28498d902782215e53c6fa"
      ],
      "layout": "IPY_MODEL_46f644cf589e4a48a6fad1742f0c0575"
     }
    },
    "3c37e72850c746ce9c919add5340dede": {
     "model_module": "@jupyter-widgets/base",
     "model_module_version": "1.2.0",
     "model_name": "LayoutModel",
     "state": {
      "_model_module": "@jupyter-widgets/base",
      "_model_module_version": "1.2.0",
      "_model_name": "LayoutModel",
      "_view_count": null,
      "_view_module": "@jupyter-widgets/base",
      "_view_module_version": "1.2.0",
      "_view_name": "LayoutView",
      "align_content": null,
      "align_items": null,
      "align_self": null,
      "border": null,
      "bottom": null,
      "display": null,
      "flex": null,
      "flex_flow": null,
      "grid_area": null,
      "grid_auto_columns": null,
      "grid_auto_flow": null,
      "grid_auto_rows": null,
      "grid_column": null,
      "grid_gap": null,
      "grid_row": null,
      "grid_template_areas": null,
      "grid_template_columns": null,
      "grid_template_rows": null,
      "height": null,
      "justify_content": null,
      "justify_items": null,
      "left": null,
      "margin": null,
      "max_height": null,
      "max_width": null,
      "min_height": null,
      "min_width": null,
      "object_fit": null,
      "object_position": null,
      "order": null,
      "overflow": null,
      "overflow_x": null,
      "overflow_y": null,
      "padding": null,
      "right": null,
      "top": null,
      "visibility": null,
      "width": null
     }
    },
    "3f748152b9274556afad2555572aa9f4": {
     "model_module": "@jupyter-widgets/controls",
     "model_module_version": "1.5.0",
     "model_name": "DescriptionStyleModel",
     "state": {
      "_model_module": "@jupyter-widgets/controls",
      "_model_module_version": "1.5.0",
      "_model_name": "DescriptionStyleModel",
      "_view_count": null,
      "_view_module": "@jupyter-widgets/base",
      "_view_module_version": "1.2.0",
      "_view_name": "StyleView",
      "description_width": ""
     }
    },
    "3fef46c902524717b377dee6c1dfc929": {
     "model_module": "@jupyter-widgets/base",
     "model_module_version": "1.2.0",
     "model_name": "LayoutModel",
     "state": {
      "_model_module": "@jupyter-widgets/base",
      "_model_module_version": "1.2.0",
      "_model_name": "LayoutModel",
      "_view_count": null,
      "_view_module": "@jupyter-widgets/base",
      "_view_module_version": "1.2.0",
      "_view_name": "LayoutView",
      "align_content": null,
      "align_items": null,
      "align_self": null,
      "border": null,
      "bottom": null,
      "display": null,
      "flex": null,
      "flex_flow": null,
      "grid_area": null,
      "grid_auto_columns": null,
      "grid_auto_flow": null,
      "grid_auto_rows": null,
      "grid_column": null,
      "grid_gap": null,
      "grid_row": null,
      "grid_template_areas": null,
      "grid_template_columns": null,
      "grid_template_rows": null,
      "height": null,
      "justify_content": null,
      "justify_items": null,
      "left": null,
      "margin": null,
      "max_height": null,
      "max_width": null,
      "min_height": null,
      "min_width": null,
      "object_fit": null,
      "object_position": null,
      "order": null,
      "overflow": null,
      "overflow_x": null,
      "overflow_y": null,
      "padding": null,
      "right": null,
      "top": null,
      "visibility": null,
      "width": null
     }
    },
    "40e148c291ad4f739998a7eac55a8af6": {
     "model_module": "@jupyter-widgets/base",
     "model_module_version": "1.2.0",
     "model_name": "LayoutModel",
     "state": {
      "_model_module": "@jupyter-widgets/base",
      "_model_module_version": "1.2.0",
      "_model_name": "LayoutModel",
      "_view_count": null,
      "_view_module": "@jupyter-widgets/base",
      "_view_module_version": "1.2.0",
      "_view_name": "LayoutView",
      "align_content": null,
      "align_items": null,
      "align_self": null,
      "border": null,
      "bottom": null,
      "display": null,
      "flex": null,
      "flex_flow": null,
      "grid_area": null,
      "grid_auto_columns": null,
      "grid_auto_flow": null,
      "grid_auto_rows": null,
      "grid_column": null,
      "grid_gap": null,
      "grid_row": null,
      "grid_template_areas": null,
      "grid_template_columns": null,
      "grid_template_rows": null,
      "height": null,
      "justify_content": null,
      "justify_items": null,
      "left": null,
      "margin": null,
      "max_height": null,
      "max_width": null,
      "min_height": null,
      "min_width": null,
      "object_fit": null,
      "object_position": null,
      "order": null,
      "overflow": null,
      "overflow_x": null,
      "overflow_y": null,
      "padding": null,
      "right": null,
      "top": null,
      "visibility": null,
      "width": null
     }
    },
    "46f644cf589e4a48a6fad1742f0c0575": {
     "model_module": "@jupyter-widgets/base",
     "model_module_version": "1.2.0",
     "model_name": "LayoutModel",
     "state": {
      "_model_module": "@jupyter-widgets/base",
      "_model_module_version": "1.2.0",
      "_model_name": "LayoutModel",
      "_view_count": null,
      "_view_module": "@jupyter-widgets/base",
      "_view_module_version": "1.2.0",
      "_view_name": "LayoutView",
      "align_content": null,
      "align_items": null,
      "align_self": null,
      "border": null,
      "bottom": null,
      "display": null,
      "flex": null,
      "flex_flow": null,
      "grid_area": null,
      "grid_auto_columns": null,
      "grid_auto_flow": null,
      "grid_auto_rows": null,
      "grid_column": null,
      "grid_gap": null,
      "grid_row": null,
      "grid_template_areas": null,
      "grid_template_columns": null,
      "grid_template_rows": null,
      "height": null,
      "justify_content": null,
      "justify_items": null,
      "left": null,
      "margin": null,
      "max_height": null,
      "max_width": null,
      "min_height": null,
      "min_width": null,
      "object_fit": null,
      "object_position": null,
      "order": null,
      "overflow": null,
      "overflow_x": null,
      "overflow_y": null,
      "padding": null,
      "right": null,
      "top": null,
      "visibility": null,
      "width": null
     }
    },
    "47838fa763ca40598b2622a9d1e79444": {
     "model_module": "@jupyter-widgets/controls",
     "model_module_version": "1.5.0",
     "model_name": "HTMLModel",
     "state": {
      "_dom_classes": [],
      "_model_module": "@jupyter-widgets/controls",
      "_model_module_version": "1.5.0",
      "_model_name": "HTMLModel",
      "_view_count": null,
      "_view_module": "@jupyter-widgets/controls",
      "_view_module_version": "1.5.0",
      "_view_name": "HTMLView",
      "description": "",
      "description_tooltip": null,
      "layout": "IPY_MODEL_b102e756f9b848a98f58396fc825be84",
      "placeholder": "​",
      "style": "IPY_MODEL_fbd7219af1924d2ead5310eb7b35aab0",
      "value": " 1.04M/1.04M [00:00&lt;00:00, 23.7MB/s]"
     }
    },
    "4cc9ec6ba46647aba2d53e352f91c137": {
     "model_module": "@jupyter-widgets/base",
     "model_module_version": "1.2.0",
     "model_name": "LayoutModel",
     "state": {
      "_model_module": "@jupyter-widgets/base",
      "_model_module_version": "1.2.0",
      "_model_name": "LayoutModel",
      "_view_count": null,
      "_view_module": "@jupyter-widgets/base",
      "_view_module_version": "1.2.0",
      "_view_name": "LayoutView",
      "align_content": null,
      "align_items": null,
      "align_self": null,
      "border": null,
      "bottom": null,
      "display": null,
      "flex": null,
      "flex_flow": null,
      "grid_area": null,
      "grid_auto_columns": null,
      "grid_auto_flow": null,
      "grid_auto_rows": null,
      "grid_column": null,
      "grid_gap": null,
      "grid_row": null,
      "grid_template_areas": null,
      "grid_template_columns": null,
      "grid_template_rows": null,
      "height": null,
      "justify_content": null,
      "justify_items": null,
      "left": null,
      "margin": null,
      "max_height": null,
      "max_width": null,
      "min_height": null,
      "min_width": null,
      "object_fit": null,
      "object_position": null,
      "order": null,
      "overflow": null,
      "overflow_x": null,
      "overflow_y": null,
      "padding": null,
      "right": null,
      "top": null,
      "visibility": null,
      "width": null
     }
    },
    "64b754f563834be0a6963349b1f2dcf2": {
     "model_module": "@jupyter-widgets/controls",
     "model_module_version": "1.5.0",
     "model_name": "HTMLModel",
     "state": {
      "_dom_classes": [],
      "_model_module": "@jupyter-widgets/controls",
      "_model_module_version": "1.5.0",
      "_model_name": "HTMLModel",
      "_view_count": null,
      "_view_module": "@jupyter-widgets/controls",
      "_view_module_version": "1.5.0",
      "_view_name": "HTMLView",
      "description": "",
      "description_tooltip": null,
      "layout": "IPY_MODEL_a02534c347aa4865ab4ab3de3a3ee2f5",
      "placeholder": "​",
      "style": "IPY_MODEL_b0ccb9d9d96e4ed8bec4d540c34d337c",
      "value": "Downloading (…)/main/tokenizer.json: 100%"
     }
    },
    "7438aea716f44d85ad1c2b49a93acd83": {
     "model_module": "@jupyter-widgets/base",
     "model_module_version": "1.2.0",
     "model_name": "LayoutModel",
     "state": {
      "_model_module": "@jupyter-widgets/base",
      "_model_module_version": "1.2.0",
      "_model_name": "LayoutModel",
      "_view_count": null,
      "_view_module": "@jupyter-widgets/base",
      "_view_module_version": "1.2.0",
      "_view_name": "LayoutView",
      "align_content": null,
      "align_items": null,
      "align_self": null,
      "border": null,
      "bottom": null,
      "display": null,
      "flex": null,
      "flex_flow": null,
      "grid_area": null,
      "grid_auto_columns": null,
      "grid_auto_flow": null,
      "grid_auto_rows": null,
      "grid_column": null,
      "grid_gap": null,
      "grid_row": null,
      "grid_template_areas": null,
      "grid_template_columns": null,
      "grid_template_rows": null,
      "height": null,
      "justify_content": null,
      "justify_items": null,
      "left": null,
      "margin": null,
      "max_height": null,
      "max_width": null,
      "min_height": null,
      "min_width": null,
      "object_fit": null,
      "object_position": null,
      "order": null,
      "overflow": null,
      "overflow_x": null,
      "overflow_y": null,
      "padding": null,
      "right": null,
      "top": null,
      "visibility": null,
      "width": null
     }
    },
    "7b24b46d6c3643e581ba003a9c473745": {
     "model_module": "@jupyter-widgets/base",
     "model_module_version": "1.2.0",
     "model_name": "LayoutModel",
     "state": {
      "_model_module": "@jupyter-widgets/base",
      "_model_module_version": "1.2.0",
      "_model_name": "LayoutModel",
      "_view_count": null,
      "_view_module": "@jupyter-widgets/base",
      "_view_module_version": "1.2.0",
      "_view_name": "LayoutView",
      "align_content": null,
      "align_items": null,
      "align_self": null,
      "border": null,
      "bottom": null,
      "display": null,
      "flex": null,
      "flex_flow": null,
      "grid_area": null,
      "grid_auto_columns": null,
      "grid_auto_flow": null,
      "grid_auto_rows": null,
      "grid_column": null,
      "grid_gap": null,
      "grid_row": null,
      "grid_template_areas": null,
      "grid_template_columns": null,
      "grid_template_rows": null,
      "height": null,
      "justify_content": null,
      "justify_items": null,
      "left": null,
      "margin": null,
      "max_height": null,
      "max_width": null,
      "min_height": null,
      "min_width": null,
      "object_fit": null,
      "object_position": null,
      "order": null,
      "overflow": null,
      "overflow_x": null,
      "overflow_y": null,
      "padding": null,
      "right": null,
      "top": null,
      "visibility": null,
      "width": null
     }
    },
    "7b47c78391a4431aa2d3f84677f24046": {
     "model_module": "@jupyter-widgets/controls",
     "model_module_version": "1.5.0",
     "model_name": "DescriptionStyleModel",
     "state": {
      "_model_module": "@jupyter-widgets/controls",
      "_model_module_version": "1.5.0",
      "_model_name": "DescriptionStyleModel",
      "_view_count": null,
      "_view_module": "@jupyter-widgets/base",
      "_view_module_version": "1.2.0",
      "_view_name": "StyleView",
      "description_width": ""
     }
    },
    "7da29a2b6508494282acbc459eccbb96": {
     "model_module": "@jupyter-widgets/controls",
     "model_module_version": "1.5.0",
     "model_name": "FloatProgressModel",
     "state": {
      "_dom_classes": [],
      "_model_module": "@jupyter-widgets/controls",
      "_model_module_version": "1.5.0",
      "_model_name": "FloatProgressModel",
      "_view_count": null,
      "_view_module": "@jupyter-widgets/controls",
      "_view_module_version": "1.5.0",
      "_view_name": "ProgressView",
      "bar_style": "success",
      "description": "",
      "description_tooltip": null,
      "layout": "IPY_MODEL_7438aea716f44d85ad1c2b49a93acd83",
      "max": 1042301,
      "min": 0,
      "orientation": "horizontal",
      "style": "IPY_MODEL_fe39f994fa9b4d7daa232e1dcd2b0e8b",
      "value": 1042301
     }
    },
    "868aa268dd28498d902782215e53c6fa": {
     "model_module": "@jupyter-widgets/controls",
     "model_module_version": "1.5.0",
     "model_name": "HTMLModel",
     "state": {
      "_dom_classes": [],
      "_model_module": "@jupyter-widgets/controls",
      "_model_module_version": "1.5.0",
      "_model_name": "HTMLModel",
      "_view_count": null,
      "_view_module": "@jupyter-widgets/controls",
      "_view_module_version": "1.5.0",
      "_view_name": "HTMLView",
      "description": "",
      "description_tooltip": null,
      "layout": "IPY_MODEL_3c37e72850c746ce9c919add5340dede",
      "placeholder": "​",
      "style": "IPY_MODEL_2053e6adef1b4dba89f861eaf3d916fd",
      "value": " 456k/456k [00:00&lt;00:00, 11.9MB/s]"
     }
    },
    "9d229e5dd56e4d539ca2c1b9f0a37812": {
     "model_module": "@jupyter-widgets/controls",
     "model_module_version": "1.5.0",
     "model_name": "FloatProgressModel",
     "state": {
      "_dom_classes": [],
      "_model_module": "@jupyter-widgets/controls",
      "_model_module_version": "1.5.0",
      "_model_name": "FloatProgressModel",
      "_view_count": null,
      "_view_module": "@jupyter-widgets/controls",
      "_view_module_version": "1.5.0",
      "_view_name": "ProgressView",
      "bar_style": "success",
      "description": "",
      "description_tooltip": null,
      "layout": "IPY_MODEL_398f1c0f56fe4f218d999df138adfdac",
      "max": 456318,
      "min": 0,
      "orientation": "horizontal",
      "style": "IPY_MODEL_f1839e86863948f68314f81ba6bca4c9",
      "value": 456318
     }
    },
    "a02534c347aa4865ab4ab3de3a3ee2f5": {
     "model_module": "@jupyter-widgets/base",
     "model_module_version": "1.2.0",
     "model_name": "LayoutModel",
     "state": {
      "_model_module": "@jupyter-widgets/base",
      "_model_module_version": "1.2.0",
      "_model_name": "LayoutModel",
      "_view_count": null,
      "_view_module": "@jupyter-widgets/base",
      "_view_module_version": "1.2.0",
      "_view_name": "LayoutView",
      "align_content": null,
      "align_items": null,
      "align_self": null,
      "border": null,
      "bottom": null,
      "display": null,
      "flex": null,
      "flex_flow": null,
      "grid_area": null,
      "grid_auto_columns": null,
      "grid_auto_flow": null,
      "grid_auto_rows": null,
      "grid_column": null,
      "grid_gap": null,
      "grid_row": null,
      "grid_template_areas": null,
      "grid_template_columns": null,
      "grid_template_rows": null,
      "height": null,
      "justify_content": null,
      "justify_items": null,
      "left": null,
      "margin": null,
      "max_height": null,
      "max_width": null,
      "min_height": null,
      "min_width": null,
      "object_fit": null,
      "object_position": null,
      "order": null,
      "overflow": null,
      "overflow_x": null,
      "overflow_y": null,
      "padding": null,
      "right": null,
      "top": null,
      "visibility": null,
      "width": null
     }
    },
    "a2edbc4195d843e0acfba83726a08e78": {
     "model_module": "@jupyter-widgets/controls",
     "model_module_version": "1.5.0",
     "model_name": "HTMLModel",
     "state": {
      "_dom_classes": [],
      "_model_module": "@jupyter-widgets/controls",
      "_model_module_version": "1.5.0",
      "_model_name": "HTMLModel",
      "_view_count": null,
      "_view_module": "@jupyter-widgets/controls",
      "_view_module_version": "1.5.0",
      "_view_name": "HTMLView",
      "description": "",
      "description_tooltip": null,
      "layout": "IPY_MODEL_7b24b46d6c3643e581ba003a9c473745",
      "placeholder": "​",
      "style": "IPY_MODEL_3f748152b9274556afad2555572aa9f4",
      "value": " 665/665 [00:00&lt;00:00, 22.7kB/s]"
     }
    },
    "adb40ef11f094594b14776e238955224": {
     "model_module": "@jupyter-widgets/base",
     "model_module_version": "1.2.0",
     "model_name": "LayoutModel",
     "state": {
      "_model_module": "@jupyter-widgets/base",
      "_model_module_version": "1.2.0",
      "_model_name": "LayoutModel",
      "_view_count": null,
      "_view_module": "@jupyter-widgets/base",
      "_view_module_version": "1.2.0",
      "_view_name": "LayoutView",
      "align_content": null,
      "align_items": null,
      "align_self": null,
      "border": null,
      "bottom": null,
      "display": null,
      "flex": null,
      "flex_flow": null,
      "grid_area": null,
      "grid_auto_columns": null,
      "grid_auto_flow": null,
      "grid_auto_rows": null,
      "grid_column": null,
      "grid_gap": null,
      "grid_row": null,
      "grid_template_areas": null,
      "grid_template_columns": null,
      "grid_template_rows": null,
      "height": null,
      "justify_content": null,
      "justify_items": null,
      "left": null,
      "margin": null,
      "max_height": null,
      "max_width": null,
      "min_height": null,
      "min_width": null,
      "object_fit": null,
      "object_position": null,
      "order": null,
      "overflow": null,
      "overflow_x": null,
      "overflow_y": null,
      "padding": null,
      "right": null,
      "top": null,
      "visibility": null,
      "width": null
     }
    },
    "b0ccb9d9d96e4ed8bec4d540c34d337c": {
     "model_module": "@jupyter-widgets/controls",
     "model_module_version": "1.5.0",
     "model_name": "DescriptionStyleModel",
     "state": {
      "_model_module": "@jupyter-widgets/controls",
      "_model_module_version": "1.5.0",
      "_model_name": "DescriptionStyleModel",
      "_view_count": null,
      "_view_module": "@jupyter-widgets/base",
      "_view_module_version": "1.2.0",
      "_view_name": "StyleView",
      "description_width": ""
     }
    },
    "b102e756f9b848a98f58396fc825be84": {
     "model_module": "@jupyter-widgets/base",
     "model_module_version": "1.2.0",
     "model_name": "LayoutModel",
     "state": {
      "_model_module": "@jupyter-widgets/base",
      "_model_module_version": "1.2.0",
      "_model_name": "LayoutModel",
      "_view_count": null,
      "_view_module": "@jupyter-widgets/base",
      "_view_module_version": "1.2.0",
      "_view_name": "LayoutView",
      "align_content": null,
      "align_items": null,
      "align_self": null,
      "border": null,
      "bottom": null,
      "display": null,
      "flex": null,
      "flex_flow": null,
      "grid_area": null,
      "grid_auto_columns": null,
      "grid_auto_flow": null,
      "grid_auto_rows": null,
      "grid_column": null,
      "grid_gap": null,
      "grid_row": null,
      "grid_template_areas": null,
      "grid_template_columns": null,
      "grid_template_rows": null,
      "height": null,
      "justify_content": null,
      "justify_items": null,
      "left": null,
      "margin": null,
      "max_height": null,
      "max_width": null,
      "min_height": null,
      "min_width": null,
      "object_fit": null,
      "object_position": null,
      "order": null,
      "overflow": null,
      "overflow_x": null,
      "overflow_y": null,
      "padding": null,
      "right": null,
      "top": null,
      "visibility": null,
      "width": null
     }
    },
    "b458d6fa793d4fa080b9f1e5013af3de": {
     "model_module": "@jupyter-widgets/base",
     "model_module_version": "1.2.0",
     "model_name": "LayoutModel",
     "state": {
      "_model_module": "@jupyter-widgets/base",
      "_model_module_version": "1.2.0",
      "_model_name": "LayoutModel",
      "_view_count": null,
      "_view_module": "@jupyter-widgets/base",
      "_view_module_version": "1.2.0",
      "_view_name": "LayoutView",
      "align_content": null,
      "align_items": null,
      "align_self": null,
      "border": null,
      "bottom": null,
      "display": null,
      "flex": null,
      "flex_flow": null,
      "grid_area": null,
      "grid_auto_columns": null,
      "grid_auto_flow": null,
      "grid_auto_rows": null,
      "grid_column": null,
      "grid_gap": null,
      "grid_row": null,
      "grid_template_areas": null,
      "grid_template_columns": null,
      "grid_template_rows": null,
      "height": null,
      "justify_content": null,
      "justify_items": null,
      "left": null,
      "margin": null,
      "max_height": null,
      "max_width": null,
      "min_height": null,
      "min_width": null,
      "object_fit": null,
      "object_position": null,
      "order": null,
      "overflow": null,
      "overflow_x": null,
      "overflow_y": null,
      "padding": null,
      "right": null,
      "top": null,
      "visibility": null,
      "width": null
     }
    },
    "b53e8481f6d64018988dc03081bf2765": {
     "model_module": "@jupyter-widgets/controls",
     "model_module_version": "1.5.0",
     "model_name": "ProgressStyleModel",
     "state": {
      "_model_module": "@jupyter-widgets/controls",
      "_model_module_version": "1.5.0",
      "_model_name": "ProgressStyleModel",
      "_view_count": null,
      "_view_module": "@jupyter-widgets/base",
      "_view_module_version": "1.2.0",
      "_view_name": "StyleView",
      "bar_color": null,
      "description_width": ""
     }
    },
    "b5566e3db2914ddebd80d7bde75b2559": {
     "model_module": "@jupyter-widgets/controls",
     "model_module_version": "1.5.0",
     "model_name": "HBoxModel",
     "state": {
      "_dom_classes": [],
      "_model_module": "@jupyter-widgets/controls",
      "_model_module_version": "1.5.0",
      "_model_name": "HBoxModel",
      "_view_count": null,
      "_view_module": "@jupyter-widgets/controls",
      "_view_module_version": "1.5.0",
      "_view_name": "HBoxView",
      "box_style": "",
      "children": [
       "IPY_MODEL_208d404f405a42a3b06d65ad67fb7322",
       "IPY_MODEL_7da29a2b6508494282acbc459eccbb96",
       "IPY_MODEL_47838fa763ca40598b2622a9d1e79444"
      ],
      "layout": "IPY_MODEL_ff32a3f12e814740a1cd5dd12bd731d4"
     }
    },
    "c06865c1e01a441698dacf48600dd03c": {
     "model_module": "@jupyter-widgets/controls",
     "model_module_version": "1.5.0",
     "model_name": "HTMLModel",
     "state": {
      "_dom_classes": [],
      "_model_module": "@jupyter-widgets/controls",
      "_model_module_version": "1.5.0",
      "_model_name": "HTMLModel",
      "_view_count": null,
      "_view_module": "@jupyter-widgets/controls",
      "_view_module_version": "1.5.0",
      "_view_name": "HTMLView",
      "description": "",
      "description_tooltip": null,
      "layout": "IPY_MODEL_adb40ef11f094594b14776e238955224",
      "placeholder": "​",
      "style": "IPY_MODEL_7b47c78391a4431aa2d3f84677f24046",
      "value": "Downloading (…)olve/main/merges.txt: 100%"
     }
    },
    "c078fe9a056a473dab7d474cd7907154": {
     "model_module": "@jupyter-widgets/controls",
     "model_module_version": "1.5.0",
     "model_name": "DescriptionStyleModel",
     "state": {
      "_model_module": "@jupyter-widgets/controls",
      "_model_module_version": "1.5.0",
      "_model_name": "DescriptionStyleModel",
      "_view_count": null,
      "_view_module": "@jupyter-widgets/base",
      "_view_module_version": "1.2.0",
      "_view_name": "StyleView",
      "description_width": ""
     }
    },
    "c7636a6d7380465895b8c86d34caf500": {
     "model_module": "@jupyter-widgets/controls",
     "model_module_version": "1.5.0",
     "model_name": "FloatProgressModel",
     "state": {
      "_dom_classes": [],
      "_model_module": "@jupyter-widgets/controls",
      "_model_module_version": "1.5.0",
      "_model_name": "FloatProgressModel",
      "_view_count": null,
      "_view_module": "@jupyter-widgets/controls",
      "_view_module_version": "1.5.0",
      "_view_name": "ProgressView",
      "bar_style": "success",
      "description": "",
      "description_tooltip": null,
      "layout": "IPY_MODEL_f22e9615de674e05978f332eb88750cf",
      "max": 1355256,
      "min": 0,
      "orientation": "horizontal",
      "style": "IPY_MODEL_b53e8481f6d64018988dc03081bf2765",
      "value": 1355256
     }
    },
    "d55f842766484d299c75f74e31e7aa6a": {
     "model_module": "@jupyter-widgets/controls",
     "model_module_version": "1.5.0",
     "model_name": "HBoxModel",
     "state": {
      "_dom_classes": [],
      "_model_module": "@jupyter-widgets/controls",
      "_model_module_version": "1.5.0",
      "_model_name": "HBoxModel",
      "_view_count": null,
      "_view_module": "@jupyter-widgets/controls",
      "_view_module_version": "1.5.0",
      "_view_name": "HBoxView",
      "box_style": "",
      "children": [
       "IPY_MODEL_1bdaf4dab16f48dbaeed3fb9bf268e45",
       "IPY_MODEL_026cc1a42e154f1f92b5236869311929",
       "IPY_MODEL_a2edbc4195d843e0acfba83726a08e78"
      ],
      "layout": "IPY_MODEL_40e148c291ad4f739998a7eac55a8af6"
     }
    },
    "eab4127882d24acfa9518ebff6f4e22a": {
     "model_module": "@jupyter-widgets/controls",
     "model_module_version": "1.5.0",
     "model_name": "HBoxModel",
     "state": {
      "_dom_classes": [],
      "_model_module": "@jupyter-widgets/controls",
      "_model_module_version": "1.5.0",
      "_model_name": "HBoxModel",
      "_view_count": null,
      "_view_module": "@jupyter-widgets/controls",
      "_view_module_version": "1.5.0",
      "_view_name": "HBoxView",
      "box_style": "",
      "children": [
       "IPY_MODEL_64b754f563834be0a6963349b1f2dcf2",
       "IPY_MODEL_c7636a6d7380465895b8c86d34caf500",
       "IPY_MODEL_f7803dea63994cc2a31acf805bd19e67"
      ],
      "layout": "IPY_MODEL_380a0c11434241b191b17421e395be8b"
     }
    },
    "f1839e86863948f68314f81ba6bca4c9": {
     "model_module": "@jupyter-widgets/controls",
     "model_module_version": "1.5.0",
     "model_name": "ProgressStyleModel",
     "state": {
      "_model_module": "@jupyter-widgets/controls",
      "_model_module_version": "1.5.0",
      "_model_name": "ProgressStyleModel",
      "_view_count": null,
      "_view_module": "@jupyter-widgets/base",
      "_view_module_version": "1.2.0",
      "_view_name": "StyleView",
      "bar_color": null,
      "description_width": ""
     }
    },
    "f22e9615de674e05978f332eb88750cf": {
     "model_module": "@jupyter-widgets/base",
     "model_module_version": "1.2.0",
     "model_name": "LayoutModel",
     "state": {
      "_model_module": "@jupyter-widgets/base",
      "_model_module_version": "1.2.0",
      "_model_name": "LayoutModel",
      "_view_count": null,
      "_view_module": "@jupyter-widgets/base",
      "_view_module_version": "1.2.0",
      "_view_name": "LayoutView",
      "align_content": null,
      "align_items": null,
      "align_self": null,
      "border": null,
      "bottom": null,
      "display": null,
      "flex": null,
      "flex_flow": null,
      "grid_area": null,
      "grid_auto_columns": null,
      "grid_auto_flow": null,
      "grid_auto_rows": null,
      "grid_column": null,
      "grid_gap": null,
      "grid_row": null,
      "grid_template_areas": null,
      "grid_template_columns": null,
      "grid_template_rows": null,
      "height": null,
      "justify_content": null,
      "justify_items": null,
      "left": null,
      "margin": null,
      "max_height": null,
      "max_width": null,
      "min_height": null,
      "min_width": null,
      "object_fit": null,
      "object_position": null,
      "order": null,
      "overflow": null,
      "overflow_x": null,
      "overflow_y": null,
      "padding": null,
      "right": null,
      "top": null,
      "visibility": null,
      "width": null
     }
    },
    "f2a1c5087d0e44909139697ed90474e8": {
     "model_module": "@jupyter-widgets/controls",
     "model_module_version": "1.5.0",
     "model_name": "ProgressStyleModel",
     "state": {
      "_model_module": "@jupyter-widgets/controls",
      "_model_module_version": "1.5.0",
      "_model_name": "ProgressStyleModel",
      "_view_count": null,
      "_view_module": "@jupyter-widgets/base",
      "_view_module_version": "1.2.0",
      "_view_name": "StyleView",
      "bar_color": null,
      "description_width": ""
     }
    },
    "f7803dea63994cc2a31acf805bd19e67": {
     "model_module": "@jupyter-widgets/controls",
     "model_module_version": "1.5.0",
     "model_name": "HTMLModel",
     "state": {
      "_dom_classes": [],
      "_model_module": "@jupyter-widgets/controls",
      "_model_module_version": "1.5.0",
      "_model_name": "HTMLModel",
      "_view_count": null,
      "_view_module": "@jupyter-widgets/controls",
      "_view_module_version": "1.5.0",
      "_view_name": "HTMLView",
      "description": "",
      "description_tooltip": null,
      "layout": "IPY_MODEL_b458d6fa793d4fa080b9f1e5013af3de",
      "placeholder": "​",
      "style": "IPY_MODEL_119d6d7a8d524aa49170f5784ebc6b9e",
      "value": " 1.36M/1.36M [00:00&lt;00:00, 30.3MB/s]"
     }
    },
    "fbd7219af1924d2ead5310eb7b35aab0": {
     "model_module": "@jupyter-widgets/controls",
     "model_module_version": "1.5.0",
     "model_name": "DescriptionStyleModel",
     "state": {
      "_model_module": "@jupyter-widgets/controls",
      "_model_module_version": "1.5.0",
      "_model_name": "DescriptionStyleModel",
      "_view_count": null,
      "_view_module": "@jupyter-widgets/base",
      "_view_module_version": "1.2.0",
      "_view_name": "StyleView",
      "description_width": ""
     }
    },
    "fd8b887c1f7149f2876cf8a31e534ad6": {
     "model_module": "@jupyter-widgets/controls",
     "model_module_version": "1.5.0",
     "model_name": "DescriptionStyleModel",
     "state": {
      "_model_module": "@jupyter-widgets/controls",
      "_model_module_version": "1.5.0",
      "_model_name": "DescriptionStyleModel",
      "_view_count": null,
      "_view_module": "@jupyter-widgets/base",
      "_view_module_version": "1.2.0",
      "_view_name": "StyleView",
      "description_width": ""
     }
    },
    "fe39f994fa9b4d7daa232e1dcd2b0e8b": {
     "model_module": "@jupyter-widgets/controls",
     "model_module_version": "1.5.0",
     "model_name": "ProgressStyleModel",
     "state": {
      "_model_module": "@jupyter-widgets/controls",
      "_model_module_version": "1.5.0",
      "_model_name": "ProgressStyleModel",
      "_view_count": null,
      "_view_module": "@jupyter-widgets/base",
      "_view_module_version": "1.2.0",
      "_view_name": "StyleView",
      "bar_color": null,
      "description_width": ""
     }
    },
    "ff32a3f12e814740a1cd5dd12bd731d4": {
     "model_module": "@jupyter-widgets/base",
     "model_module_version": "1.2.0",
     "model_name": "LayoutModel",
     "state": {
      "_model_module": "@jupyter-widgets/base",
      "_model_module_version": "1.2.0",
      "_model_name": "LayoutModel",
      "_view_count": null,
      "_view_module": "@jupyter-widgets/base",
      "_view_module_version": "1.2.0",
      "_view_name": "LayoutView",
      "align_content": null,
      "align_items": null,
      "align_self": null,
      "border": null,
      "bottom": null,
      "display": null,
      "flex": null,
      "flex_flow": null,
      "grid_area": null,
      "grid_auto_columns": null,
      "grid_auto_flow": null,
      "grid_auto_rows": null,
      "grid_column": null,
      "grid_gap": null,
      "grid_row": null,
      "grid_template_areas": null,
      "grid_template_columns": null,
      "grid_template_rows": null,
      "height": null,
      "justify_content": null,
      "justify_items": null,
      "left": null,
      "margin": null,
      "max_height": null,
      "max_width": null,
      "min_height": null,
      "min_width": null,
      "object_fit": null,
      "object_position": null,
      "order": null,
      "overflow": null,
      "overflow_x": null,
      "overflow_y": null,
      "padding": null,
      "right": null,
      "top": null,
      "visibility": null,
      "width": null
     }
    }
   }
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
